package com.itheima.d6_synchronized_lock;

import com.itheima.d4_synchronized_code.Ticket;

/**
 * 目标：模拟线程安全问题。
 */
public class ThreadTest {
    public static void main(String[] args) {

        Ticket ticket = new Ticket();
        Thread thread1 = new Thread(ticket,"窗口1 ");
        Thread thread2 = new Thread(ticket,"窗口2 ");
        Thread thread3 = new Thread(ticket,"窗口3 ");
        Thread thread4 = new Thread(ticket,"窗口4 ");
        Thread thread5 = new Thread(ticket,"窗口5 ");
        Thread thread6 = new Thread(ticket,"窗口6 ");
        Thread thread7 = new Thread(ticket,"窗口7 ");
        Thread thread8 = new Thread(ticket,"窗口8 ");

        thread1.start();
        thread2.start();
        thread3.start();
        thread4.start();
        thread5.start();
        thread6.start();
        thread7.start();
        thread8.start();


    }
}


